package com.skysz.cglib;

import java.lang.reflect.Method;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

public class PaymentInterceptor implements MethodInterceptor {

	@Override
	public Object intercept(Object target, Method method, Object[] args,
			MethodProxy methodProxy) throws Throwable {
		System.out.println("begin " + method.getName());
		Object result = methodProxy.invokeSuper(target, args);
		System.out.println("end " + method.getName());
		return result;
	}

}
